/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.importExcel.store;

import java.sql.Date;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.N100;
import queenb.web.util.PackageContants;

/**
 *
 * @author Nguyen Hung
 */
public class importStore extends N100 {

    public int importCustomer(String pvNV102, String pvNV103, int pnNN104, String pvNV108,String pvNV109,
            String pvNV112, int pnNN117, Date pdND118, String pvNV119,String pvNV122,
            String pvNV130,int pnNN131, String pvNV351C, String pvNV351P, Date pdND352,
            Date pdND353, String pvNV354, String pvKV301, String pvKV103, int pnFK350C,
            int pnFK350V,String pvNV552, String pvNV251, String pvNV952, String pvNV955,
            String pvNV957, String pvNV958, String pvNV959, String pvNV960, String pvNV961,
            String pvNV962, String pvNV964, String pvNV967, String pvNV968, String pvNV969,
            int pnFH000, int pnFH200, String pvLOGIN) {
        try {
            DataStatement updateStatement = new DataStatement(PackageContants.IMPORTTABN100, OracleTypes.INTEGER, new Param[]{                        
                        new Param(OracleTypes.CHAR, pvNV102),
                        new Param(OracleTypes.CHAR, pvNV103),
                        new Param(OracleTypes.INTEGER, pnNN104),
                        new Param(OracleTypes.CHAR, pvNV108),   
                        new Param(OracleTypes.CHAR, pvNV109),
                        //
                        new Param(OracleTypes.CHAR, pvNV112),
                        new Param(OracleTypes.INTEGER, pnNN117),
                        new Param(OracleTypes.DATE, pdND118),
                        new Param(OracleTypes.CHAR, pvNV119),
                        new Param(OracleTypes.CHAR, pvNV122),
                        //
                        new Param(OracleTypes.CHAR, pvNV130),
                        new Param(OracleTypes.INTEGER, pnNN131),
                        new Param(OracleTypes.CHAR, pvNV351C),
                        new Param(OracleTypes.CHAR, pvNV351P),
                        new Param(OracleTypes.DATE, pdND352),
                        //
                        new Param(OracleTypes.DATE, pdND353),
                        new Param(OracleTypes.CHAR, pvNV354),
                        new Param(OracleTypes.CHAR, pvKV301),
                        new Param(OracleTypes.CHAR, pvKV103),
                        new Param(OracleTypes.INTEGER, pnFK350C),
                        //
                        new Param(OracleTypes.INTEGER, pnFK350V),
                        new Param(OracleTypes.CHAR, pvNV552),
                        new Param(OracleTypes.CHAR, pvNV251),
                        new Param(OracleTypes.CHAR, pvNV952),
                        new Param(OracleTypes.CHAR, pvNV955),
                        //
                        new Param(OracleTypes.CHAR, pvNV957),
                        new Param(OracleTypes.CHAR, pvNV958),
                        new Param(OracleTypes.CHAR, pvNV959),
                        new Param(OracleTypes.CHAR, pvNV960),
                        new Param(OracleTypes.CHAR, pvNV961),
                        //
                        new Param(OracleTypes.CHAR, pvNV962),
                        new Param(OracleTypes.CHAR, pvNV964),
                        new Param(OracleTypes.CHAR, pvNV967),
                        new Param(OracleTypes.CHAR, pvNV968),
                        new Param(OracleTypes.CHAR, pvNV969),
                        //
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),                        
                        new Param(OracleTypes.CHAR, pvLOGIN)});
            return super.update(updateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(importStore.class.getName()).log(Level.SEVERE, null, ex);
            return -1;
        }
    }
}
